//
//  MyTopButton.m
//  UI_A段项目_iDaily Watch
//
//  Created by 徐继垚 on 14-10-13.
//  Copyright (c) 2014年 徐继垚. All rights reserved.
//

#import "MyTopButton.h"

@implementation MyTopButton

- (void)dealloc
{
    [_button1 release];
    [_button2 release];
    [_button3 release];
    [_button4 release];
    [_button5 release];
    [_button6 release];
    [super dealloc];
}
- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        
        
        self.button1 = [UIButton buttonWithType:UIButtonTypeCustom];
        self.button1.frame = CGRectMake(0, 0, 160, 50);
        self.button1.backgroundColor = [UIColor redColor];
        [self.button1 setBackgroundImage:[UIImage imageNamed:@"o1.png"] forState:UIControlStateNormal];
        [self addSubview:_button1];
            
        self.button2 = [UIButton buttonWithType:UIButtonTypeCustom];
        self.button2.frame = CGRectMake(160, 0, 160, 50);
        self.button2.backgroundColor = [UIColor redColor];
             [self.button2 setBackgroundImage:[UIImage imageNamed:@"o2.png"] forState:UIControlStateNormal];
        [self addSubview:_button2];
        
        self.button3 = [UIButton buttonWithType:UIButtonTypeCustom];
        self.button3.frame = CGRectMake(0, 50, 160, 50);
        self.button3.backgroundColor = [UIColor redColor];
             [self.button3 setBackgroundImage:[UIImage imageNamed:@"o3.png"] forState:UIControlStateNormal];
        [self addSubview:_button3];
        
        self.button4 = [UIButton buttonWithType:UIButtonTypeCustom];
        self.button4.frame = CGRectMake(160, 50, 160, 50);
        self.button4.backgroundColor = [UIColor redColor];
             [self.button4 setBackgroundImage:[UIImage imageNamed:@"o4.png"] forState:UIControlStateNormal];
        [self addSubview:_button4];
        
        
        self.button5 = [UIButton buttonWithType:UIButtonTypeCustom];
        self.button5.frame = CGRectMake(0, 100, 160, 50);
        self.button5.backgroundColor = [UIColor redColor];
             [self.button5 setBackgroundImage:[UIImage imageNamed:@"o5.png"] forState:UIControlStateNormal];
        [self addSubview:_button5];
        
        self.button6 = [UIButton buttonWithType:UIButtonTypeCustom];
        self.button6.frame = CGRectMake(160, 100, 160, 50);
        self.button6.backgroundColor = [UIColor redColor];
             [self.button6 setBackgroundImage:[UIImage imageNamed:@"o6.png"] forState:UIControlStateNormal];
        [self addSubview:_button6];
        
        self.button7 = [UIButton buttonWithType:UIButtonTypeCustom];
        self.button7.frame = CGRectMake(0, 150, 320, 70);
        self.button7.backgroundColor = [UIColor redColor];
        [self.button7 setBackgroundImage:[UIImage imageNamed:@"guanggao.png"] forState:UIControlStateNormal];
        [self addSubview:_button7];

        
        
        
        
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
